﻿<%@ Page Title="Slabs" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SlabStructure.aspx.cs" Inherits="SlabStructure" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="LableTitle" runat="server" Font-Bold="true" Font-Size="Medium" ForeColor="Black"
        Text="Slab Structure"></asp:Label>
    <table border="1">
        <tr>
            <td rowspan="4" style="width: 20%;" align="left" valign="top">
                <asp:ListBox ID="LBSlabs" runat="server" Rows="25" Width="100%" DataSourceID="SDSSlabList"
                    DataTextField="Name" DataValueField="RowNo" OnSelectedIndexChanged="LBSlabs_SelectedIndexChanged"
                    AutoPostBack="True"></asp:ListBox>
                <asp:SqlDataSource ID="SDSSlabList" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                    SelectCommand="SELECT [RowNo], [Name] FROM [Slabs]"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                <asp:Panel ID="PanelUpper" runat="server" Width="700px" Height="150px">
                    <table align="left" style="width: 700px">
                        <tr>
                            <td colspan="2">
                                <%-- name box --%>
                                <asp:Label ID="LabelName" runat="server" Text="Slab Name" Width="100px"></asp:Label>
                                <asp:TextBox ID="TextBoxName" runat="server" Width="300px" 
                                    ontextchanged="TextBoxName_TextChanged" AutoPostBack="True"></asp:TextBox>
                                <br />
                                <br />
                                <%-- from/to date --%>
                                <asp:Label ID="LabelDummy1" runat="server" Width="100px"></asp:Label>
                                <asp:Label ID="LabelFromDate" runat="server" Text="From Date" Width="68px"></asp:Label>
                                <asp:TextBox ID="TBFromDate" runat="server" Width="75px" 
                                    ontextchanged="TBFromDate_TextChanged" AutoPostBack="True"></asp:TextBox>
                                <ajax:CalendarExtender ID="CalendarFromDate" runat="server" PopupButtonID="TBFromDate"
                                    TargetControlID="TBFromDate" Format="yyyy-MM-dd">
                                </ajax:CalendarExtender>
                                <asp:Label ID="LabelToDate" runat="server" Text="To Date" Width="68px"></asp:Label>
                                <asp:TextBox ID="TBToDate" runat="server" Width="75px" 
                                    ontextchanged="TBToDate_TextChanged" AutoPostBack="True"></asp:TextBox>
                                <ajax:CalendarExtender ID="CalendarToDate" runat="server" PopupButtonID="TBToDate"
                                    TargetControlID="TBToDate" Format="yyyy-MM-dd">
                                </ajax:CalendarExtender>
                                <%-- stepped/tiered --%>
                                <asp:Label ID="LabelStepped" runat="server" Text="Step/Tier" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLSteppedTired" runat="server" OnLoad="DDLSteppedTired_Load"
                                    Width="80px" />
                                <br />
                                <br />
                                <%-- row: count, operator, formula --%>
                                <asp:Label ID="LabelRow" runat="server" Text=" Row Details" Width="100px"></asp:Label>
                                <asp:Label ID="LabelRowCount" runat="server" Text="Dimension" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLRowCount" runat="server" OnLoad="DDLRowCount_Load" Width="80px" />
                                <asp:Label ID="LabelRowRelOp" runat="server" Text="Operator" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLRowRelOp" runat="server" OnLoad="DDLRowRelOp_Load" Width="80px" />
                                <asp:Label ID="LableFormulaR" runat="server" Text="Formula" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLFunctionR" runat="server" DataTextField="Name" DataValueField="RowNo"
                                    OnLoad="DDLFunctionR_Load" Width="200px">
                                </asp:DropDownList>
                                <br />
                                <br />
                                <%-- column: count, operator, formula --%>
                                <asp:Label ID="LabelColumn" runat="server" Text=" Column Details" Width="100px"></asp:Label>
                                <asp:Label ID="LabelColCount" runat="server" Text="Dimension" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLColumnCount" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDLColumnCount_SelectedIndexChanged"
                                    OnLoad="DDLColumnCount_Load" Width="80px" />
                                <asp:Label ID="LabelColRelOp" runat="server" Text="Operator" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLColumnRelOp" runat="server" OnLoad="DDLColumnRelOp_Load"
                                    Width="80px" />
                                <asp:Label ID="LableFormulaC" runat="server" Text="Formula" Width="70px"></asp:Label>
                                <asp:DropDownList ID="DDLFunctionC" runat="server" DataTextField="Name" DataValueField="RowNo"
                                    OnLoad="DDLFunctionC_Load" Width="200px" />
                                <br />
                                <br />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                <asp:Panel ID="panelMiddleOuter" runat="server" Width="700px" ScrollBars="Both" Height="200px">
                    <asp:Panel ID="panelMiddleInner" runat="server" Width="2500px" Height="600px">
                        <asp:Table ID="PanelTable" runat="server">
                        </asp:Table>
                    </asp:Panel>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="center" valign="middle">
                <asp:Panel ID="PanelLower" runat="server">
                    <asp:Button ID="BApply" runat="server" Text="Apply" Width="100px" OnClick="BApply_Click" />
                    <asp:Button ID="BCreate" runat="server" Text="Create New" Width="100px" OnClick="BCreate_Click" />
                    &nbsp;<asp:Button ID="BCancel" runat="server" Text="Cancel" Width="100px" OnClick="BCancel_Click" />
                    <asp:Button ID="BEdit" runat="server" Text="Edit" Width="100px" OnClick="BEdit_Click" />
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
